
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
	<title>可用可信家庭市场</title>
	<!--                       CSS                       -->
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="screen" />
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="/static/css/invalid.css" type="text/css" media="screen" />
	<!--                       Javascripts                       -->
	<!-- jQuery -->
	<script type="text/javascript" src="/static/scripts/jquery-1.3.2.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="/static/scripts/simpla.jquery.configuration.js"></script>
	<!-- Facebox jQuery Plugin -->
	<script type="text/javascript" src="/static/scripts/facebox.js"></script>
	<!-- jQuery WYSIWYG Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.wysiwyg.js"></script>
	<!-- jQuery Datepicker Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.datePicker.js"></script>
	<script type="text/javascript" src="/static/scripts/jquery.date.js"></script>
	<!-- jQuery -->
    <script type="text/JavaScript" src="/static/date/WdatePicker.js" ></script>
	
	<!-- jQuery -->
	<link rel="stylesheet" type="text/css" media="all" href="/static/css/motai.css">
	<script type="text/javascript" src="/static/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/static/js/jquery.leanModal.min.js"></script>
	<style>
		body{
			font-family:黑体;
		}
		 table {
            width:500px;
            height:300px;
            float:left;
            margin-top:20px;
            margin-left:10px;
            
        }
        .table3 {
            
            height:200px;
           
            
        }
        .table4 {
            height:400px;
           
        }
        table tr {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
            background-color:#E0EEEE;
            font-size:15px;
        }
        .table1{
            width:1000px;
        }
        .t1{
            background-color:#FFF8DC;
        }
        table.hovertable {
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #999999;
            border-collapse: collapse;
        }
        table.hovertable th {
            background-color:#c3dde0;
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
        }
        table.hovertable tr {
            background-color:#d4e3e5;
        }
        table.hovertable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #a9c6c9;
            font-size:15px;
            line-height:20px;
        }

	</style>
</head>
<body>
<div id="body-wrapper">
	<!-- Wrapper for the radial gradient background -->
	<div id="sidebar">
		<div id="sidebar-wrapper">

			<div id="profile-links">
				<!-- Logo (221px wide) -->
				<a href="#"><img id="logo" src="/static/images/logo.png" alt="Simpla Admin logo" /></a>

				{$_COOKIE['user_name']},你好 <br/>
				| <a href="/index.php/index/index/uexit" title="Sign Out">退出</a> </div>

			 <ul id="main-nav">
                <!-- Accordion Menu -->
                <!--<li> <a href="#/" class="nav-top-item no-submenu">-->
                    <!--&lt;!&ndash; Add the class "no-submenu" to menu items with no sub menu &ndash;&gt;-->
                    <!--Dashboard </a> </li>-->
               {if condition="!empty($powers['order_action'])"}
                <li> <a href="#" class="nav-top-item"> 订单操作</a>
                    <ul>
                    	
                        <li><a href="/index.php/index/index/neworder_list">新订单</a></li>
                        <!-- Add class "current" to sub menu items also -->
                        <li><a href="/index.php/index/index/addorder">创建新订单</a></li>
                        <li><a href="/index.php/index/index/allorder_list">所有订单</a></li>
                    </ul>
                </li>
           	{/if}
           	 {if condition="!empty($powers['cg_action'])"}
                <li> <a href="#" class="nav-top-item"> 采购单 </a>
                    <ul>
                        <li><a href="/index.php/index/index/newcg_list">待处理 采购单</a></li>
                        <li><a href="/index.php/index/index/cg_history">采购单历史</a></li>
                    </ul>
                </li>
             {/if}
              {if condition="!empty($powers['table_action'])"}
                <li> <a href="#" class="nav-top-item  current"> 报表 </a>
                    <ul>
                        <li><a href="/index.php/index/biao/daybiao">日报表</a></li>
                        <li><a href="/index.php/index/biao/yuebiao">月报表</a></li>
                        <li><a  class="current" href="/index.php/index/biao/nianbiao">年报表</a></li>
                    </ul>
                </li>
               {/if}
                {if condition="!empty($powers['goods_action'])"}
                <li> <a href="#" class="nav-top-item">菜品管理 </a>
                    <ul>
                        <li><a href="/index.php/index/goods/goods">所有菜品</a></li>
                        <li><a href="/index.php/index/goods/categorys">所有分类</a></li>
                    </ul>
                </li>
                {/if}
                 {if condition="!empty($powers['promotion_action'])"}
                 <li> <a href="#" class="nav-top-item"> 推广活动 </a>
                    <ul>
                        <li><a href="/index.php/index/promotion/snlist">SN优惠码</a></li>
                    </ul>
                </li>
                {/if}
                <li> <a href="#" class="nav-top-item"> 个人信息 </a>
                    <ul>
                        <li><a href="/index.php/index/index/user_info">查看信息</a></li>
                        <li><a href="/index.php/index/index/update_pass">修改密码</a></li>
                    </ul>
                </li>
       
                {if condition="!empty($powers['super'])"}
                 <li><a href="#" class="nav-top-item"> 用户管理 </a>
                 	<ul>
                        <li><a href="/index.php/index/admin/user_admin">用户权限</a></li>
                    </ul>
                 </li>
                {/if}

            </ul>
            <!-- End #main-nav -->

		</div>
	</div>
	<!-- End #sidebar -->
	<div id="main-content">
		<div class="content-box" style="width:49%;float:left;height:820px;">
			<!-- Start Content Box -->
				<div class="content-box-header" ><br />
					<h5>&nbsp;数据统计：</h5>
				</div>
				<!-- End .content-box-header -->
				<div class="content-box-content">
				
	               <div style="width:500px;height:300px;">
                                    <table class="table2 hovertable">
                                        <tr onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#d4e3e5';">
                                            <td >月份</td>
                                            <td >月销量（单）</td>
                                        </tr>

                                        {volist name="carray" id="c" }
                                        <tr onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#d4e3e5';">
                                            <td>{$c.yue}月:</td> <td class="t2">{$c.count}</td>
                                        </tr>
                                        {/volist}
                                    </table>
                                       
	                             </div>  
	                              <div style="width:500px;height:300px;"> 
	                                <table class="table3 hovertable">
                                        <tr onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#d4e3e5';">
                                        	<td>月份</td>
                                            <td>月销售额（元）</td>
                                        </tr>

                                        {volist name="carray" id="c" }
                                        <tr onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#d4e3e5';">
                                            <td>{$c.yue}月:</td> <td class="t2">{$c.sale}</td>
                                        </tr>
                                        {/volist}
                                    </table>
								</div>
				</div>
			<!-- End .content-box-content -->
		</div>
			<!-- End .content-box -->
					<div class="content-box" style="width:49%;float:right;height:820px;">
			<!-- Start Content Box -->
			<div class="content-box-header" ><br />
				<h5>&nbsp;年报表</h5>
			</div>
			<!-- End .content-box-header -->
						<div class="content-box-content">
										<div style="width:600px;">
			                            <img src="/niancount.php?monthstr={$monthstr}&countstr={$countstr}" />
			                            <br /><br />
			                            <img style="float:right;" src="/niansale.php?monthstr={$monthstr}&salestr={$salestr}" />
			                    		</div>
			                        
						</div>
					<!-- End .content-box-content -->
					</div>
			<!-- End .content-box -->


	</div>
	<!-- End #main-content -->
	
	
</div>

<script>
	function printPage(k,key,ps_date)
	{
		var bdhtml=window.document.body.innerHTML;//获取当前页面html代码
		var sprnstr= "<!--startprint"+k+"-->" ;
		var eprnstr= "<!--endprint"+k+"-->" ;
		var prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18);
		prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
		window.document.body.innerHTML=prnhtml;
		window.print();
		window.document.body.innerHTML=bdhtml;
		$('#reids_date').val(ps_date);
		$('#reids_time').val(key);
	}


	message_tips();
	/**
	 * ajax提醒
	 **/
	a = 1;
	function fn(){

		if(a == 1){
			$('#message_tips').css({color:'white'});
			$('#message_tips2').css({color:'white'});
			a = 0;
		}else{
			$('#message_tips').css({color:'#F00'});
			$('#message_tips2').css({color:'#F00'});
			a = 1;
		}
	}
	var myInterval;
	function message_tips(){
		$.get("/index.php/index/index/tips", function(data){
			if(data != $('#message_tips').html()){
				$('#message_tips').css({color:'#F00'});
				myInterval = setInterval(fn,5000);
				$('#message_tips2').css({color:'#F00'});
				$("#message_audio").html("<audio id='ttsoundplayer'  autoplay='autoplay'><source src='/static/sound/1583.wav' type='audio/wav'></audio>");

			} else {
				$("#message_audio").html('');
				if(data == 0){
					$('#message_tips').css({color:'#000'});
					clearInterval(myInterval);
				}
			}

			$('#message_tips').html(data);
			$('#message_tips2').html(data);
		},'json');
		setTimeout('message_tips()',10000);
	}



</script>

<!-- won模态框（Modal） -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1" style="display:none;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">是否打印成功？
			<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		</div>
		<div class="am-modal-bd">
			打印成功后，此页面将不再显示该采购表<br/><br/>
			<form method="post" action="/index.php/index/index/printcg_success">
				<input type="hidden" name="ps_date" value="" id="reids_date"/>
				<input type="hidden" name="ps_time" value="" id="reids_time"/>
				<button type="submit" class="submit btn btn-primary">
					确定已打印
				</button>
			</form>
		</div>
	</div>
</div>
<!-- won模态框（Modal） -->
</body>
</html>
